'use strict';

// Clientes
angular.module('simon.controllers').controller('VendaListCtrl', ['$scope', 'VendaFactory',
  function ($scope, VendaFactory) {
	/* callback for ng-click 'find': */
    $scope.find = function () {
		if ($scope.dataIni && $scope.dataFim) {
			$scope.itens =  VendaFactory.query({ dataIni: $scope.dataIni, dataFim: $scope.dataFim });
		}
    };
    $scope.itens = null;
  }]);
